Repository navigation
refactor!: Rename UpdateDefaultSetupConfigurationOptions to UpdateDefaultSetupConfigurationRequest and pass it by value - #4694
Merged
gmlewis merged 3 commits intoOct 31, 2026
Conversation
…faultSetupConfigurationOptions`
…DefaultSetupConfigurationRequest` and pass by value
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4694 +/- ##
=======================================
Coverage 98.64% 98.64%
=======================================
Files 203 203
Lines 19027 19027
=======================================
Hits 18769 18769
Misses 258 258 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gmlewis
approved these changes
Oct 30, 2026
gmlewis
left a comment
Collaborator
There was a problem hiding this comment.
Thank you, @JamBalaya56562!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
Collaborator
|
Thank you, @Not-Dhananjay-Mishra! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates #3644.
BREAKING CHANGE:
UpdateDefaultSetupConfigurationOptionsis renamed toUpdateDefaultSetupConfigurationRequestand is passed by value toCodeScanningService.UpdateDefaultSetupConfiguration; itsStatefield is now*string.This PR converts the request body type of the "update a code scanning default setup configuration" endpoint (
PATCH /repos/{owner}/{repo}/code-scanning/default-setup). The request schema (code-scanning-default-setup-update) has norequiredproperties, but the Go type always sentstate, and it was missing three of the six properties.Three commits:
fix!-Statebecomes*stringwithomitempty, so a request that only changes, for example,query_suiteno longer sends"state": "".Languagesusesomitzeroinstead ofomitempty, following the convention for optional slices. The test now checks the request body.feat- Add the missingrunner_type(RunnerType),runner_label(RunnerLabel), andthreat_model(ThreatModel) properties.refactor!- Rename the type toUpdateDefaultSetupConfigurationRequestand pass it by value. The type is removed from bothbody-allowed-pointer-typesandbody-allowed-wrong-names, and the test variable is namedbody.The method name already matches the GitHub docs operation name, so it is not renamed. The response type
UpdateDefaultSetupConfigurationResponsealready has both properties of its schema (run_id,run_url).Verified locally:
go build ./...,go vet -tags integration ./test/integration/,go test ./github/, generated files idempotent,custom-gcl0 issues, andscript/check-schema-fields.shreports no new issues.